<?php

namespace api\modules\app\models;

use Yii;

/**
 * This is the model class for table "qrcode_record".
 *
 * @property integer $id
 * @property integer $user_id
 * @property string $user_name
 * @property integer $count
 * @property integer $bind_count
 * @property integer $state
 * @property string $path
 * @property string $created_at
 */
class QrcodeRecord extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'qrcode_record';
    }

    /**
     * @return \yii\db\Connection the database connection used by this AR class.
     */
    public static function getDb()
    {
        return Yii::$app->get('test_3');
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['user_id', 'count', 'bind_count', 'state'], 'integer'],
            [['created_at'], 'safe'],
            [['user_name', 'path'], 'string', 'max' => 50],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'user_id' => 'User ID',
            'user_name' => 'User Name',
            'count' => 'Count',
            'bind_count' => 'Bind Count',
            'state' => 'State',
            'path' => 'Path',
            'created_at' => 'Created At',
        ];
    }
}
